In a SAS® session with the double-byte character set (DBCS) option set, if the DEFAULT style or a style with DEFAULT as its parent is applied to output created by the EXCELXP tagset, an XLS/XML file is created without any errors generated in the SAS Log. However, when the file is opened in Microsoft Excel, the following dialog box is generated:
Problems came up in the following areas during load:
Style
The problem is with the fonts definition in the style DEFAULT, which combines MS UI Gothic and Sans-serif. Alternative PROC TEMPLATE code is included in the Full Code tab showing a style template that removes the Sans-serif font.
This problem can also be encountered in a single-byte character set environment (NODBCS) if a fonts list includes a font name with more than one space and the Sans-serif specification. The workaround is the same as that shown in the Full Code tab, which illustrates the removal of the Sans-serif font in the list.
Operating System and Release Information
SAS System | Base SAS | z/OS | 9.1 TS1M3 SP4 | 9.4 TS1M3 |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.1 TS1M3 SP4 | |
Microsoft Windows XP 64-bit Edition | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Professional | 9.1 TS1M3 SP4 | |
Microsoft Windows NT Workstation | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M3 SP4 | |
Microsoft Windows XP Professional | 9.1 TS1M3 SP4 | |
Windows Vista | 9.1 TS1M3 SP4 | |
64-bit Enabled AIX | 9.1 TS1M3 SP4 | 9.4 TS1M3 |
64-bit Enabled HP-UX | 9.1 TS1M3 SP4 | 9.4 TS1M3 |
64-bit Enabled Solaris | 9.1 TS1M3 SP4 | 9.4 TS1M3 |
HP-UX IPF | 9.1 TS1M3 SP4 | 9.4 TS1M3 |
Linux | 9.1 TS1M3 SP4 | 9.4 TS1M3 |
Linux on Itanium | 9.1 TS1M3 SP4 | 9.4 TS1M3 |
OpenVMS Alpha | 9.1 TS1M3 SP4 | 9.4 TS1M3 |
Solaris for x64 | 9.1 TS1M3 SP4 | 9.4 TS1M3 |
Tru64 UNIX | 9.1 TS1M3 SP4 | 9.4 TS1M3 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
The PROC TEMPLATE code to create the style PROBLEM has a font with multiple spaces in the name: MS UI Gothic and Sans-serif. The XML file that is generated cannot be opened by Microsoft Excel. The workaround code removes Sans-serif from the fonts list for each style reference in the style named WORKAROUND.
proc template;
define style Styles.problem;
parent=styles.default;
replace fonts
"Fonts used in the default style" /
'TitleFont2' = ("'MS UI Gothic', Helvetica, sans-serif",4,Bold Italic)
'TitleFont' = ("'MS UI Gothic', Helvetica, sans-serif",5,Bold Italic)
'StrongFont' = ("'MS UI Gothic', Helvetica, sans-serif",4,Bold)
'EmphasisFont' = ("'MS UI Gothic', Helvetica, sans-serif",3,Italic)
'FixedEmphasisFont' = ("Courier New, Courier, monospace",2,Italic)
'FixedStrongFont' = ("Courier New, Courier, monospace",2,Bold)
'FixedHeadingFont' = ("Courier New, Courier, monospace",2)
'BatchFixedFont' = ("SAS Monospace, Courier New, Courier, monospace",2)
'FixedFont' = ("Courier",2)
'headingEmphasisFont' = ("'MS UI Gothic', Helvetica, sans-serif",4,Bold Italic)
'headingFont' = ("'MS UI Gothic', Helvetica, sans-serif",4,Bold)
'docFont' = ("'MS UI Gothic', Helvetica, sans-serif",3);
end;
run;
ods tagsets.excelxp file="problem.xml" style=styles.problem;
proc print data=sashelp.class;
run;
ods _all_ close;
/* WORKAROUND */
proc template;
define style Styles.Workaround;
parent=styles.default;
replace fonts
"Fonts used in the default style" /
'TitleFont2' = ("'MS UI Gothic', Helvetica ",4,Bold Italic)
'TitleFont' = ("'MS UI Gothic', Helvetica ",5,Bold Italic)
'StrongFont' = ("'MS UI Gothic', Helvetica ",4,Bold)
'EmphasisFont' = ("'MS UI Gothic', Helvetica ",3,Italic)
'FixedEmphasisFont' = ("Courier New, Courier, monospace",2,Italic)
'FixedStrongFont' = ("Courier New, Courier, monospace",2,Bold)
'FixedHeadingFont' = ("Courier New, Courier, monospace",2)
'BatchFixedFont' = ("SAS Monospace, Courier New, Courier, monospace",2)
'FixedFont' = ("Courier",2)
'headingEmphasisFont' = ("'MS UI Gothic', Helvetica ",4,Bold Italic)
'headingFont' = ("'MS UI Gothic', Helvetica ",4,Bold)
'docFont' = ("'MS UI Gothic', Helvetica ",3);
end;
run;
ods tagsets.excelxp file="workaround.xml" style=styles.workaround;
proc print data=sashelp.class;
run;
ods _all_ close;